{include file="public_head" /}

<!-- Select2 -->
<link href="__STATIC__/css/select/select2.min.css" rel="stylesheet">

<body class="nav-md">

<div class="container body">

    <div class="main_container">

        {include file="public_sidebar,public_nav" /}
        <!-- page content -->
        <div class="right_col" role="main">
            <div class="">

                <div class="page-title">
                    <div class="title_left">
                        <h3>订单详细管理</h3>
                    </div>
                </div>
                <div class="clearfix"></div>
                <div class="row">
                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>{$mate_title}</h2>
                                <ul class="nav navbar-right panel_toolbox">
                                    <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                                    </li>
                                    <li><a class="close-link"><i class="fa fa-close"></i></a>
                                    </li>
                                </ul>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content">
                                <br/>
                                <form class="form-horizontal form-label-left" enctype="multipart/form-data" action=""
                                      method="post" id="registerForm">

                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">订 单 号：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                            <div>{$item.order_number}&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                        </div>
                                    </div>

                                    <div class="divider-dashed"></div>

                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">店铺名称：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                            {$item.title}
                                        </div>
                                    </div>

                                    <div class="divider-dashed"></div>

                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">买家账号/昵称：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                            {$item.username}/{$item.nickname}
                                        </div>
                                    </div>
                                    <div class="divider-dashed"></div>


                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">收货地址详情：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                            姓　　名：{$item.address_name}<br>
                                            手 机 号 ：{$item.address_phone}<br>
                                            地　　区：{$item.address_area}<br>
                                            详细地址：{$item.address_site}<br>
                                        </div>
                                    </div>
                                    <div class="divider-dashed"></div>

                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">订单总额：</label>
                                        <div class="col-md-1 col-sm-6 col-xs-12" style="margin-top: 10px;">

                                            <input type="text" placeholder="订单总额"
                                                   class="form-control col-md-7 col-xs-12" name="price"
                                                   value="{$item.price|default='0'}"
                                                   style="width: 100px;text-align: center"
                                                   {gt name="item.price" value="0"}disabled{/gt}
                                            >
                                        </div>
                                    </div>

                                    <div class="divider-dashed"></div>

                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">订单状态：</label>
                                        <div class="col-md-1 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                            {switch name="$item.status"}
                                            {case value="0"}未支付{/case}
                                            {case value="1"}已支付{/case}
                                            {case value="2"}已发货{/case}
                                            {case value="3"}已收货{/case}
                                            {/switch}
                                            <br/>
                                            {if condition="$item.status eq 1 || $item.status eq 6"}
                                            <div style="width:500px;clear: both">
                                                <span style="font-size: 16px;color: red">注：操作发货和退款的时候，别忘记改变订单状态</span>
                                            </div>
                                            {/if}
                                            {if condition="$item.status eq 1"}
                                            <input type="checkbox" name="status"  value="2"> 已发货
                                            {/if}
                                        </div>

                                    </div>

                                    {in name="$item.status" value="1,2,3"}

                                    <div class="divider-dashed"></div>

                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">快递参数：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;width: 550px;">

                                            <select name="express_name" class="select2_single"
                                                    style="width: 200px;float: left;" tabindex="-1" datatype="*" nullmsg="请选择快递名称"
                                                    {notempty name="$item.express_name"}disabled{/notempty}

                                            >
                                            <option value="" {eq name='item.express_name|default=""' value=''}selected{/eq}>暂无填写</option>
                                            {volist name="express_list" id="exp_list"}
                                            <option {eq name='exp_list.code' value='$item.express_name|default=""'}selected{/eq} value="{$exp_list.code}">
                                            {$exp_list.name}
                                            </option>
                                            {/volist}
                                            </select>

                                            <input type="text" placeholder="请输入运单号"
                                                   class="form-control col-md-7 col-xs-12" name="express_number"
                                                   value="{$item.express_number|default=''}"
                                                   maxlength="20" datatype="n" nullmsg="请选择快递单号"
                                                   style="width: 300px;float: right;"
                                                   {notempty name="$item.express_number"}disabled{/notempty}
                                            >

                                        </div>
                                    </div>

                                    {/in}

                                    <div class="divider-dashed"></div>



                                    <div class="ln_solid"></div>
                                    {notin name="$item.status" value="2"}
                                    <div class="form-group">
                                        <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                                            <button type="submit" class="btn btn-primary">提交</button>
                                            <a type="reset" class="btn btn-success" onclick="history.go(-1)">返回</a>
                                        </div>
                                    </div>
                                    {/notin}

                                </form>
                            </div>
                        </div>
                    </div>
                </div>


            </div>
            <!-- /page content -->

        </div>

    </div>
</div>

{include file="public_foot" /}
<!-- validform -->
<script src="__STATIC__/js/Validform_v5.3.2_min.js"></script>
<script src="__STATIC__/js/layer.js"></script>
<!--select-->
<script src="__STATIC__/js/select/select2.full.min.js"></script>
<script>

    // validform
    $(function () {

        $.Tipmsg.r = null;

        var showmsg = function (msg) {
            //假定你的店铺商品提示方法为showmsg， 在方法里可以接收参数msg，当然也可以接收到o及cssctl;
            alert(msg);
        }

        // select2
        $(".select2_single").select2({
            placeholder: "请选择快递公司",
            allowClear: true
        });

        $(".select2_single2").select2({
            placeholder: "请选择订单状态",
            allowClear: true
        });

        $("#registerForm").Validform({
            tiptype: function (msg) {
                layer.msg(msg);
            },
            tipSweep: true
        });
    })
</script>
</body>

</html>
